<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改用户信息</title>
<%@ include file="/app/includes/header.jsp"%>
<script type="text/javascript">
	function updateUser(){
		$('#userForm').submit();
	}
</script>
</head>
<body>
	<div id="panel" class="easyui-panel" title="修改用户信息"
		icon="icon-edit-form" collapsible="true"
		style="padding: 10px;">

		<form id="userForm" action="<%=request.getContextPath()%>/auth/user/updateUser.action" method="post" >
			<table class="table-form">
			<tr>
				<td>
					登录ID:
				</td>
				<td>
					<input id="id" name="id" type="text" value="${user.id}"  readonly="readonly"></input>
				</td>
				<td >
				</td>
			</tr>
			<tr>
				<td>
					姓名:
				</td>
				<td>
					<input id="name" name="name" type="text" value="${user.name}"></input>
				</td>
				<td>
					<div id="nameTip"></div>
				</td>
			</tr>
			<tr>
				<td>
					登录密码:
				</td>
				<td>
					<input id="password" name="password" type="password" value="${user.password}"></input>
				</td>
				<td>
					<div id="passwordTip" ></div>
				</td>
			</tr>
			<tr>
				<td>
					邮箱:
				</td>
				<td>
					<input id="email" name="email" type="text" value="${user.email}"></input>
				</td>
				<td>
					<div id="emailTip" ></div>
				</td>
			</tr>
			<tr>
				<td>
					电话:
				</td>
				<td>
					<input id="phone" name="phone" type="text" value ="${user.phone}"></input>
				</td>
				<td>
					<div id="phoneTip" ></div>
				</td>
			</tr>
			<tr>
				<td colspan="3">
					<div style="padding: 10px;" >
						<a href="#"  class="easyui-linkbutton" iconCls="icon-ok" onclick="updateUser()">确定</a>
						<a href="javascript:history.back(-1)" class="easyui-linkbutton"  iconCls="icon-cancel">取消</a>
					</div>
				</td>
			</tr>
			</table>
		</form>
	</div>
</body>
	<script type="text/javascript">
		$(document).ready(function(){
		$.formValidator.initConfig({formid:"userForm"});
		$("#name").formValidator({
			onshow:"请输入用户姓名",
			onfocus:"请正确填写用户姓名，例如：张三",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"用户姓名不能为空！"});
		$("#password").formValidator({
			onshow:"请输入密码",
			onfocus:"请正确填写密码，例如：Password Strength",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"密码不能为空！"});
		$("#email").formValidator({
			onshow:"请输入邮箱",
			onfocus:"请正确填写邮箱，例如：ww@163.com",
			oncorrect:"正确"})
			.regexValidator({regexp:"email",datatype:"enum",onerror:"请正确填写邮箱，例如：ww@163.com"});
		$("#phone").formValidator({
			onshow:"请输入电话",
			onfocus:"请正确填写电话(11位)，例如：13566969636",
			oncorrect:"正确"})
			.regexValidator({regexp:"phone",datatype:"enum",onerror:"请正确填写电话(11位)，例如：13566969636"});
		});
	</script>
</html>